home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / auror300.zip / CUKBD.AML < prev    next >
Text File  |  1996-07-17  |  23KB  |  579 lines

  1. //--------------------------------------------------------------------
  2. // The Aurora Editor v3.0, Copyright (C) 1993-1996 nuText Systems
  3. //
  4. // KBD.AML
  5. // Aurora/CUA Keyboard definitions (included by Main.aml)
  6. //
  7. // If you have made any changes, save this file and select Recompile
  8. // the Editor from the Set menu. Exit and re-enter the editor for
  9. // your changes to take effect.
  10. //--------------------------------------------------------------------
  11.  
  12. //--------------------------------------------------------------------
  13. // Edit and File Manager windows
  14. //--------------------------------------------------------------------
  15.  
  16. object edit_fmgr
  17.  
  18.   // Controls
  19.   function  '≡'                                // close window
  20.     close
  21.   end
  22.  
  23.   // Menu activation
  24.   key  <esc>           gotobar                 // to last menu bar item
  25.   key  <f10>           gotobar                 // to last menu bar item
  26.   key  <alt f10>       gotomenu                // goto last pull-down menu
  27.  
  28.   key  <alt f>         gotomenu "file"         // to file menu (cua)
  29.   key  <alt a>         gotomenu "macro"        // to macro menu (cua)
  30.   key  <alt p>         gotomenu "options"      // to options menu (cua)
  31.   key  <alt w>         gotomenu "window"       // to window menu (cua)
  32.   key  <alt h>         gotomenu "help"         // to help menu (cua)
  33.   key  <f1>            gotomenu "help"         // to help menu (cua)
  34.  
  35.   // Scroll
  36.   key  <pgdn>          pagedown                // scroll down (cua)
  37.   key  <pgup>          pageup                  // scroll up (cua)
  38.   key  <ctrl pgup>     row (getviewtop)        // to page top
  39.   key  <ctrl pgdn>     row (getviewbot)        // to page bottom
  40.   key  <ctrl home>     row 1                   // to file top (cua)
  41.   key  <ctrl end>      row (getlines)          // to file bottom (cua)
  42.   key  <center>        adjustrow               // center cursor
  43.   key  <ctrl f9>       adjustrow 1             // scroll to page top
  44.   key  <ctrl f10>      adjustrow (getviewrows) // scroll to page bottom
  45.   key  <ctrl up>       rollrow -1              // scroll up one line
  46.   key  <ctrl down>     rollrow  1              // scroll down one line
  47.   key  <ctrl ->        lastpos                 // to last cursor position
  48.  
  49.   // print w/prompt for marked text
  50.   function print2
  51.     if mark? then
  52.       case yncbox "Print Marked Block Only?"
  53.         when 'Yes' options = 'b'
  54.         when 'Cancel', '' return
  55.       end
  56.     end
  57.     print options
  58.   end
  59.  
  60.   // File
  61.   key  <ctrl n>        opennew                 // new edit window
  62.   key  <f3>            askopen                 // open prompt (cua)
  63.   key  <ctrl o>        askopen                 // open prompt (cua)
  64.   key  <alt z>         openlast                // open last window
  65.   key  <alt ->         filelist                // file list
  66.   key  <ctrl p>        print2                  // print
  67.   key  <alt q>         close                   // close window
  68.   key  <ctrl f4>       close                   // close window (cua-win)
  69.   key  <alt f4>        closeall                // close all windows (cua-win)
  70.   key  <alt x>         closeall                // close all windows and save
  71.   key  <shift f1>      quickref 'qw'           // quick function reference
  72.   key  <shift f2>      quickref 'fw'           // function reference
  73.  
  74.   // Window
  75.   key  <alt 0>         winlist                 // window list (cua)
  76.   key  <alt down>      minimize                // minimize window
  77.   key  <alt up>        maximize                // maximize window
  78.   key  <f6>            nextwindow              // next window (cua)
  79.   key  <shift f6>      prevwindow              // prev window (cua)
  80.   key  <shift f3>      tile 'v'                // tile vertical
  81.   key  <shift f4>      tile 'h'                // tile horizontal
  82.   key  <shift f5>      cascade                 // cascade
  83.   key  <ctrl k><q>     close                   // close window
  84.  
  85.   // Search
  86.   key  <ctrl q><s>     askscan                 // file scan prompt
  87.   key  <ctrl b>        gotomark 't'            // find top of block
  88.   key  <ctrl 6>        cyclebook               // cycle through bookmarks
  89.  
  90.   // Set
  91.   key  <ctrl f1>       togglemode              // toggle video mode
  92.   key  <alt f2>        recompile               // recompile the editor
  93.  
  94.   // Macro
  95.   key  <shift f12>     pickmacro               // macro picklist
  96.   key  <ctrl f12>      runmacro2 "maclist"     // macro menu
  97.   key  <alt f12>       askeval                 // macro command prompt
  98.   key  <alt f9>        askrun                  // Dos command prompt
  99.   key  <f9>            shell                   // exit to Dos
  100.  
  101.   // Other
  102.   key  <alt f5>        opencfg "tran"          // edit translation table
  103.  
  104.   // undefined or unnamed keys
  105.   key <otherkey> (keycode)
  106.     say (geteventname (keycode)) + " not defined"
  107.   end
  108.  
  109.  
  110. //--------------------------------------------------------------------
  111. // Prompts and Edit windows
  112. //--------------------------------------------------------------------
  113.  
  114. object prompt
  115.  
  116.   // Controls
  117.   function  '≡'                                // close window
  118.     close
  119.   end
  120.  
  121.   function  '*'                                // simulate <enter>
  122.     call <enter>                               //  (2-line box only)
  123.   end
  124.  
  125.   // Cursor
  126.   key  <left>          left                    // move cursor left
  127.   key  <right>         right                   // move cursor right
  128.   key  <home>          col 1                   // to column one
  129.   key  <end>           col  getlinelen + 1     // to end of line
  130.  
  131.   // Cursor + CUA-marking
  132.   key  <shift left>    left
  133.                        smark
  134.   key  <shift right>   right
  135.                        smark
  136.   key  <shift home>    col 1
  137.                        smark
  138.   key  <shift end>     col getlinelen + 1
  139.                        smark
  140.  
  141.   // Scroll
  142.   key  <ctrl pgup>     rollcol -(getviewcols - 1)   // page left
  143.   key  <ctrl pgdn>     rollcol   getviewcols - 1    // page right
  144.  
  145.   // Editing
  146.   key  <ins>           setting 'I' TOGGLE      // toggle insert mode
  147.   key  <del>
  148.     if getmarkbuf == getcurrbuf then
  149.       deleteblock                              // delete selected text
  150.     else
  151.       delchar                                  // delete character
  152.     end
  153.   end
  154.  
  155.   key  <backspace>     backsp                  // delete left character
  156.   key  <alt f6>        delchar MAX_COL         // erase to end of line
  157.   key  <ctrl [>        literal                 // enter literal character
  158.   key  <alt =>         asciilist               // display ascii chart
  159.  
  160.   // Block
  161.   //key  <alt a>         markchar                // mark character
  162.   key  <alt k>         markcolumn              // mark column
  163.   key  <alt 1>         markword                // mark word
  164.   key  <alt 2>         markeol                 // mark to end of line
  165.   key  <alt u>         destroymark             // unmark
  166.  
  167.   // copy block to prompt
  168.   key  <alt c>
  169.     instext (getmarktext)
  170.     col  getlinelen + 1
  171.   end
  172.  
  173.   // paste from clipboard to prompt (cua)
  174.   key  <shift ins>
  175.     oldmark = usemark _ClipName
  176.     instext (getmarktext)
  177.     usemark oldmark
  178.     col  getlinelen + 1
  179.   end
  180.   key  <ctrl v>        call <shift ins>
  181.  
  182.   // copy from prompt to clipboard (cua)
  183.   key  <ctrl ins>      copy
  184.   key  <ctrl c>        copy
  185.  
  186.   // Prompt history
  187.   key  <up>            prevhist                // retrieve prev prompt
  188.   key  <down>          nexthist                // retrieve next prompt
  189.   key  <pgup>          askhistory              // history popup menu
  190.   key  <pgdn>          askhistory              // history popup menu
  191.  
  192.   // Exit
  193.   key  <esc>           close                   // quit prompt
  194.  
  195.   // non-function keys
  196.   key  <char> (character)                      // typeable keys
  197.     write character
  198.   end
  199.  
  200.   // filename completion
  201.   key  <ctrl tab>      askcomplete             // filename completion
  202.   key  <tab>           askcomplete
  203.  
  204.  
  205. //--------------------------------------------------------------------
  206. // Edit windows
  207. //--------------------------------------------